//规定了栈的基础功能
#ifndef __VIRTUALSTACK__HPP
#define __VIRTUALSTACK__HPP

#include"../Universal.h"

namespace NgSiuKei {

template<class TheClass>
class VirtualStack {
    public:
    VirtualStack(void);
    ~VirtualStack(void);

    public:
    //判空
    bool isEmpty(void) const;
    //栈大小
    const U_L_L getSize(void) const;

    public:
    //清空
    virtual void clear(void) = 0;
    //获取栈顶元素
    virtual TheClass getTopVal(void) const = 0;
    //入栈
    virtual void push(const TheClass val) = 0;
    //出栈
    virtual TheClass pop(void) = 0;
    //打印栈
    virtual void print(void) const = 0;

    protected:
    U_L_L size;
};

template<class TheClass>
VirtualStack<TheClass>::VirtualStack(void) {
    this->size = 0;
};

template<class TheClass>
VirtualStack<TheClass>::~VirtualStack(void) {
    
};

template<class TheClass>
bool VirtualStack<TheClass>::isEmpty(void) const {
    return 0 == this->size;
}

template<class TheClass>
const U_L_L VirtualStack<TheClass>::getSize(void) const {
    return this->size;
}

}

#endif